﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Person
{
    class Person
    {
        private string name;
        private int? age;

        public Person(string name, int? age)
        {
            this.name = name;
            this.age = age;
        }

        public Person(string name)
        {
            this.name = name;
            this.age = null;
        }

        public int? Age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

        public override string ToString()
        {
            string resultAge = string.Empty;
            if (this.age == null)
            {
                resultAge = "age is not specified";
            }
            else
            {
                resultAge = this.age.ToString();
            }

            return string.Format("Name:{0}, Age:{1}", this.Name, resultAge);
        }

    }
}
